package com.example.crm.service.impl;

import com.example.crm.dao.IUserDAO;
import com.example.crm.dao.impl.UserDAOImpl;
import com.example.crm.service.IUserService;

import java.sql.SQLException;

public class UserServiceImpl implements IUserService {

    @Override
    public boolean login(String username, String password) {


        // 调用DAO查询


        IUserDAO userDAO = new UserDAOImpl();
        boolean result = false;

        try {
            result = userDAO.findByUseranmePassword(username, password);
            return result;
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return false;
    }
}
